package com.study.model.jdao.HRjdao;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

import com.study.model.pojo.HRpojo.EmpTab;

public interface EmpDao  extends JpaRepository<EmpTab, String>{
	//默认继承save方法	
	
	/**
	 * 根据工号查询所有信息
	 * @param empid
	 * @return
	 */
	public EmpTab findByEmpid(String empid);
	
	/**登陆查询
   * @param empid
   * @param emppass
   * @return
   */
  public EmpTab findByEmpidAndEmppass(String empid, String emppass);
  
  @Query("select c from EmpTab c where c.empid='emp20160908001'")
  public EmpTab selectAll();
}
